package ru.ifmo.rybakov.muclumon;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@DiscriminatorValue("n")
public class NodeState extends Element {
	@ManyToOne
	@JoinColumn(name = "reference")
	private Node node;
	
	@ManyToOne
	@JoinColumn(name = "parent_id")
	private ClusterState clusterState;

	/**
	 * Returns the node
	 * @return The node
	 */
	public Node getNode() {
		return node;
	}

	/**
	 * Sets the node value
	 * @param node The node to be set
	 */
	public void setNode(Node node) {
		this.node = node;
	}
	
	/**
	 * Returns the clusterState
	 * @return The clusterState
	 */
	public ClusterState getClusterState() {
		return clusterState;
	}

	/**
	 * Sets the clusterState value
	 * @param clusterState The clusterState to be set
	 */
	public void setClusterState(ClusterState clusterState) {
		this.clusterState = clusterState;
	}
}
